home *** CD-ROM | disk | FTP | other *** search
/ Personal Computer World 2009 February / PCWFEB09.iso / Software / Freeware / Griffith 0.9.8 / griffith-0.9.8-win32.exe / {app} / lib / view.py < prev    next >
Text File  |  2008-11-17  |  2KB  |  49 lines

  1. # -*- coding: UTF-8 -*-
  2.  
  3. __revision__ = '$Id: view.py 1040 2008-11-15 21:13:49Z mikej06 $'
  4.  
  5. # Copyright (c) 2005-2008 Vasco Nunes, Piotr O┼╝arowski
  6. #
  7. # This program is free software; you can redistribute it and/or modify
  8. # it under the terms of the GNU General Public License as published by
  9. # the Free Software Foundation; either version 2 of the License, or
  10. # (at your option) any later version.
  11. #
  12. # This program is distributed in the hope that it will be useful,
  13. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  14. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  15. # GNU Library General Public License for more details.
  16. #
  17. # You should have received a copy of the GNU General Public License
  18. # along with this program; if not, write to the Free Software
  19. # 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA
  20.  
  21. # You may use and distribute this software under the terms of the
  22. # GNU General Public License, version 2 or later
  23.  
  24. def filter_not_seen(self):
  25.     self.populate_treeview()
  26.     self.update_statusbar(_("Filter activated. Showing only not seen movies."))
  27.  
  28. def filter_loaned(self):
  29.     self.populate_treeview()
  30.     self.update_statusbar(_("Filter activated. Showing only loaned movies."))
  31.  
  32. def filter_all(self):
  33.     self.populate_treeview()
  34.  
  35. def filter_by_volume(self, volume_id):
  36.     from quick_filter import clear_filter
  37.     clear_filter(self)
  38.     self.populate_treeview(where={'volume_id':volume_id})
  39.     volume_name = self.db.Volume.get_by(volume_id=volume_id).name
  40.     self.update_statusbar(_("Filter activated. Showing only movies from volume: %s")%volume_name)
  41.  
  42. def filter_by_collection(self, collection_id):
  43.     from quick_filter import clear_filter
  44.     clear_filter(self)
  45.     self.populate_treeview(where={'collection_id':collection_id})
  46.     collection_name = self.db.Collection.get_by(collection_id=collection_id).name
  47.     self.update_statusbar(_("Filter activated. Showing only movies from collection: %s")%collection_name)
  48.  
  49.